//var sio = require('socket.io');
var parseCookie = require('express/node_modules/connect').utils.parseCookie;
var http = require('http');

exports.configure = function (app, sessionStore, dbApi) {
	var server = http.createServer(app);
	var sioLib = {},
    ios = require('socket.io').listen(server);
    ios.configure(function () {
        ios.set('log level', 3);
        ios.set("transports", ["websocket", "jsonp-polling"]);
    });
    ios.set('authorization', function (data, accept) {
    	console.log('aaaaaaa');
    	accept(null, true);
    });
    
    ios.sockets.on('connection',function (socket) {
    	
    	socket.on ('testSocket', function (data) {
    		
    	});
    	
    });
}